﻿using System;
using System.Configuration;

namespace Common
{
    public class DataConnection
    {
        private const string ErrorFormat = "数据库连接\"{0}\"配置失败。";
        private const string TestSQLConnection = "TestSQL";

        public static ConnectionStringSettings TestSQLSettings
        {
            get
            {
                try
                {
                    return ConfigurationManager.ConnectionStrings[TestSQLConnection];
                }
                catch (Exception)
                {
                    throw new Exception(string.Format(ErrorFormat, TestSQLConnection));
                }
            }
        }
    }
}
